1. Field of the Invention
The present invention relates generally to computerized methods for accessing databases, and in particular, to a method for defining object classes to match corresponding specialized data types stored in a relational database.
2. Description of Related Art
It is well known in the art to use database management systems, such as IBM""s DB2(trademark) relational database management system (RDBMS), to manage computerized databases. Currently, there is a need to access such databases using object-oriented application programs.
Object-oriented programming has become increasingly popular among software developers, because it offers the benefits of increased application program portability, interoperability, and interchangeability. Object-oriented programming techniques also reduce development risk and software development costs, and can extend the life cycle of the final product to prevent premature obsolescence.
An industry-consensus standard interface definition for interoperable object-oriented software, known as the Common Object Request Broker Architecture (CORBA), has been defined. CORBA simplifies the development and deployment of distributed systems software in several ways. First, CORBA defines a distributed environment using an object-oriented paradigm that hides differences between programming languages, operating systems, and object locations. Second, CORBA""s object-oriented approach allows diverse types of implementations to inter-operate at the same level, hiding idiosyncrasies, and supporting reuse.
A central component of CORBA is an Object Request Broker (ORB), which functions as a communications infrastructure, transparently transceiving object requests across distributed heterogeneous computing environments. This is accomplished through a well-defined interface called the Interface Definition Language (IDL). Further details regarding CORBA and IDL are set forth in xe2x80x9cThe Essential CORBA, Systems Integration Using Distributed Objects,xe2x80x9d by Thomas V. Mobray and Ron Zahavi, 1995, which publication is incorporated by reference herein.
Class libraries are available to support object-oriented programming environments such as CORBA. These class libraries allow users to generate application programs using previously-defined classes.
Some existing class libraries include classes for manipulating specialized data types such as date, decimal, duration, time, and timestamp data types. However, these class libraries do not specifically match the semantics of specialized data types retrieved from relational databases. The semantics of these specialized data types are available only through calls to a relational database management system. Thus, object-oriented application programs cannot access and manipulate specialized type data values from relational databases according to the object-oriented programming paradigm.
Therefore, there is a need in the art for technologies that access existing relational databases using object-oriented techniques. Moreover, such technologies should minimize the need for developing new application programs.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for defining object classes to match corresponding specialized data types stored in a relational database. An object-oriented application program may create an instance of a class for the purpose of representing data in a relational table that comprise a specialized data type. The attributes and behavior of the specialized data type in the database are preserved, where appropriate, in the corresponding class, and are available to the application program.
Various advantages and features of novelty, which characterize the invention, are pointed out with particularity in the claims annexed hereto and form a part hereof. However, for a better understanding of the invention, its advantages, and the objects obtained by its use, reference should be made to the drawings which form a further part hereof, and to accompanying descriptive matter, in which there is illustrated and described specific examples of an apparatus in accordance with the invention.